Re: [SQL] converting from number to text - Mailing list pgsql-sql

From Herouth Maoz
Subject Re: [SQL] converting from number to text
Date
Msg-id l03130302b38d2f49cbcc@[147.233.159.109]
Whole thread Raw
In response to converting from number to text  (Remigiusz Sokolowski <rems@gdansk.sprint.pl>)
Responses Re: [SQL] converting from number to text
List pgsql-sql
At 12:31 +0300 on 16/06/1999, Remigiusz Sokolowski wrote:


> I need convert number(float or integer) to text, but my version of
> postgres (i.e. 6.3.2) seems to have not such a function?
> Is it may be in newer versions or is there any work-around?
> TIA
>     Rems
> p.s. concept is to have field, which contain date in timestamp form
> (number of seconds from 'epoch'), but in which I could insert also value
> 'until cancellation' or any other text.

I think a better approach to your problem would be to add a status field.
The status field will contain anysuch additional information, and the date
field will only contain a date when the given status demands it. How you
display it in a report is a different matter - You can write a function
that queries the status field and substitutes it with the date value if the
status is so-and-so.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma




pgsql-sql by date:

Previous
From: "Michal Klacan"
Date:
Subject: database select support
Next
From: tolik@icomm.ru (Anatoly K. Lasareff)
Date:
Subject: Re: [SQL] converting from number to text